import 'channel_entity.dart';

class RecentChannelEntity {
  int? id;
  String? logo;
  String? name;
  int? num;
  int? sportsId;

  RecentChannelEntity({this.id, this.logo, this.name, this.num,this.sportsId});

  RecentChannelEntity.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    logo = json['logo'];
    name = json['name'];
    num = json['num'];
  }

  RecentChannelEntity.fromEntity(ChannelEntity entity) {
    id = entity.channelId;
    logo = entity.channelLogo;
    name = entity.channelName;
  }

  RecentChannelEntity.fromFocus(Map<String, dynamic> json) {
    id = json['leagueId'];
    logo = json['leagueLogo'];
    name = json['leagueName'];
    num = json['num'];
    sportsId = json['sportsId'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['logo'] = this.logo;
    data['name'] = this.name;
    data['num'] = this.num;
    return data;
  }
}